package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * PcPurchaseReqItem generated by hbm2java
 */
@Entity
@Table(name="pc_purchase_req_item"
    ,catalog="ncsc_erp"
)
public class PcPurchaseReqItem  implements java.io.Serializable {


     private PcPurchaseReqItemId id;
     private MmItem mmItem;
     private PcPurchaseReq pcPurchaseReq;
     private SysUom sysUom;
     private String prSupplierItemCode;
     private String prItemCode;
     private String prItemDescr;
     private BigDecimal prQty;
     private BigDecimal prPpu;
     private short prStatusIncVat;
     private BigDecimal prVatPercVal;
     private BigDecimal prVatVal;
     private BigDecimal prTotalPriceExcVat;
     private BigDecimal prTotalPrice;

    public PcPurchaseReqItem() {
    }

	
    public PcPurchaseReqItem(PcPurchaseReqItemId id, PcPurchaseReq pcPurchaseReq, BigDecimal prQty, BigDecimal prPpu, short prStatusIncVat, BigDecimal prVatPercVal, BigDecimal prVatVal, BigDecimal prTotalPriceExcVat, BigDecimal prTotalPrice) {
        this.id = id;
        this.pcPurchaseReq = pcPurchaseReq;
        this.prQty = prQty;
        this.prPpu = prPpu;
        this.prStatusIncVat = prStatusIncVat;
        this.prVatPercVal = prVatPercVal;
        this.prVatVal = prVatVal;
        this.prTotalPriceExcVat = prTotalPriceExcVat;
        this.prTotalPrice = prTotalPrice;
    }
    public PcPurchaseReqItem(PcPurchaseReqItemId id, MmItem mmItem, PcPurchaseReq pcPurchaseReq, SysUom sysUom, String prSupplierItemCode, String prItemCode, String prItemDescr, BigDecimal prQty, BigDecimal prPpu, short prStatusIncVat, BigDecimal prVatPercVal, BigDecimal prVatVal, BigDecimal prTotalPriceExcVat, BigDecimal prTotalPrice) {
       this.id = id;
       this.mmItem = mmItem;
       this.pcPurchaseReq = pcPurchaseReq;
       this.sysUom = sysUom;
       this.prSupplierItemCode = prSupplierItemCode;
       this.prItemCode = prItemCode;
       this.prItemDescr = prItemDescr;
       this.prQty = prQty;
       this.prPpu = prPpu;
       this.prStatusIncVat = prStatusIncVat;
       this.prVatPercVal = prVatPercVal;
       this.prVatVal = prVatVal;
       this.prTotalPriceExcVat = prTotalPriceExcVat;
       this.prTotalPrice = prTotalPrice;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="prNo", column=@Column(name="PR_NO", nullable=false) ), 
        @AttributeOverride(name="prLineNo", column=@Column(name="PR_LINE_NO", nullable=false) ) } )
    public PcPurchaseReqItemId getId() {
        return this.id;
    }
    
    public void setId(PcPurchaseReqItemId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PR_ITEM_NO")
    public MmItem getMmItem() {
        return this.mmItem;
    }
    
    public void setMmItem(MmItem mmItem) {
        this.mmItem = mmItem;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PR_NO", nullable=false, insertable=false, updatable=false)
    public PcPurchaseReq getPcPurchaseReq() {
        return this.pcPurchaseReq;
    }
    
    public void setPcPurchaseReq(PcPurchaseReq pcPurchaseReq) {
        this.pcPurchaseReq = pcPurchaseReq;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PR_UOM_NO")
    public SysUom getSysUom() {
        return this.sysUom;
    }
    
    public void setSysUom(SysUom sysUom) {
        this.sysUom = sysUom;
    }

    
    @Column(name="PR_SUPPLIER_ITEM_CODE", length=50)
    public String getPrSupplierItemCode() {
        return this.prSupplierItemCode;
    }
    
    public void setPrSupplierItemCode(String prSupplierItemCode) {
        this.prSupplierItemCode = prSupplierItemCode;
    }

    
    @Column(name="PR_ITEM_CODE", length=50)
    public String getPrItemCode() {
        return this.prItemCode;
    }
    
    public void setPrItemCode(String prItemCode) {
        this.prItemCode = prItemCode;
    }

    
    @Column(name="PR_ITEM_DESCR", length=300)
    public String getPrItemDescr() {
        return this.prItemDescr;
    }
    
    public void setPrItemDescr(String prItemDescr) {
        this.prItemDescr = prItemDescr;
    }

    
    @Column(name="PR_QTY", nullable=false, precision=10)
    public BigDecimal getPrQty() {
        return this.prQty;
    }
    
    public void setPrQty(BigDecimal prQty) {
        this.prQty = prQty;
    }

    
    @Column(name="PR_PPU", nullable=false, precision=10)
    public BigDecimal getPrPpu() {
        return this.prPpu;
    }
    
    public void setPrPpu(BigDecimal prPpu) {
        this.prPpu = prPpu;
    }

    
    @Column(name="PR_STATUS_INC_VAT", nullable=false)
    public short getPrStatusIncVat() {
        return this.prStatusIncVat;
    }
    
    public void setPrStatusIncVat(short prStatusIncVat) {
        this.prStatusIncVat = prStatusIncVat;
    }

    
    @Column(name="PR_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getPrVatPercVal() {
        return this.prVatPercVal;
    }
    
    public void setPrVatPercVal(BigDecimal prVatPercVal) {
        this.prVatPercVal = prVatPercVal;
    }

    
    @Column(name="PR_VAT_VAL", nullable=false, precision=15)
    public BigDecimal getPrVatVal() {
        return this.prVatVal;
    }
    
    public void setPrVatVal(BigDecimal prVatVal) {
        this.prVatVal = prVatVal;
    }

    
    @Column(name="PR_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getPrTotalPriceExcVat() {
        return this.prTotalPriceExcVat;
    }
    
    public void setPrTotalPriceExcVat(BigDecimal prTotalPriceExcVat) {
        this.prTotalPriceExcVat = prTotalPriceExcVat;
    }

    
    @Column(name="PR_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getPrTotalPrice() {
        return this.prTotalPrice;
    }
    
    public void setPrTotalPrice(BigDecimal prTotalPrice) {
        this.prTotalPrice = prTotalPrice;
    }




}


